package join;

/**
 * @author lianmingzhang
 * @create 2017-10-02 上午9:40
 */
public class TestArraySort {
    public static void main(String[] args) {
        double[] array = new double[10000];
        for(int i = 0; i < array.length; i++) {
            array[i] = Math.random();
        }

        SortThread thread = new SortThread(array);
        Thread t = new Thread(thread);
        t.start();
        try {
            t.join();
            System.out.println("Minimum:" + array[array.length -  1]);
            System.out.println("Median:" + array[array.length / 2]);
            System.out.println("Maximum:" + array[0]);
        } catch (Exception e) {
            e.printStackTrace();
        } 
    }
}
